import { create } from 'zustand';
import {
  combine,
  // persist,
  subscribeWithSelector,
} from 'zustand/middleware';

/** store */
export const useWebStore = create(
  subscribeWithSelector(
    combine(
      {
        url: '',
      },
      (set) => {
        return {
          async setUrl(url: string) {
            set((state) => ({ ...state, url: url }));
          },
        };
      },
    )
  ),
);
